package com.seu.clab.farm.model.dto.post;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.seu.clab.farm.model.dao.entity.Contract;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.Date;

@Data
public class ContractDTO {
    private Long cid;
    private String name;
    private String part_A;
    private String part_B;
    private String signatureUrl;
    private int flag;
    private int deleted;
    private String money;
    private String basicServiceCharge;
    private String degreeSurcharge;
    private String majorSurcharge;
    private String universitySurcharge;

    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    private Date signTime;

    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    private Date createTime;

    public ContractDTO(){}

    public ContractDTO(Contract contract) {
        BeanUtils.copyProperties(contract, this);
    }
}
